import HR from './axios'
import { encrypt } from '@utils/jsencrypt'

// 获取验证码
export const getCodeImg = () => HR('get', `/captchaImage`)
// 获取用户信息
export const getInfo = () => HR('get', `/getInfo`)
// 登录
export const login = (username, password, code, uuid) =>
  HR('post', `/login`, { username: encrypt(username), password: password.length < 50 ? encrypt(password) : password, code, uuid })
